package com.project.bean;

import java.time.LocalDate;
import java.util.List;

/**
 * 公民实体类
 */
public class ManBean {
    private int id;
    private String name;
    private LocalDate birthday;
    /**公民拥有的汽车数量*/
    private int carCount;
    //公民汽车集合
    private List<CarBean> carList;

    public ManBean() {
    }

    public ManBean(String name, String birthday) {
        this.name = name;
        this.birthday = LocalDate.parse(birthday);
    }

    public int getCarCount() {
        return carCount;
    }

    public void setCarCount(int carCount) {
        this.carCount = carCount;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public List<CarBean> getCarList() {
        return carList;
    }

    public void setCarList(List<CarBean> carList) {
        this.carList = carList;
    }

    @Override
    public String toString() {
        return "ManBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", birthday=" + birthday +
                ", carCount=" + carCount +
                ", carList=" + carList +
                '}'+"\n";
    }
}
